An application program interface (API) is a software interface that enables other software components, or software components and hardware components, to communicate and interact with one another. For instance, an application program does not need to know all the intricacies of how a particular hardware device operates and communicates. Instead, an API can be used between the application program and the hardware device. On one side, the API provides a predefined, high-level communications interface for the application program. On the other side, the API translates the high-level commands, or function calls, from the application program into the detailed instructions needed by the hardware.
Network devices often use hardware counters to count a variety of events, such as the amount of network traffic sent or received, the number of errors detected in a data stream, and the like. Due to size and cost constraints, hardware counters tend to be relatively small, often being 16 or 32 bits wide. A 32 bit hardware counter can count up to 232, or about 4.3 billion, events before overflowing, or saturating. 4.3 billion events may sound like a large number, but when the events being counted are, for instance, bytes of data in a 10 Gigabit/second data stream, a 32 bit hardware counter overflows in less than 3.5 seconds.